/**
 * This file is released under the GNU General Public License.
 * Refer to the COPYING file distributed with this package.
 *
 * Copyright (c) 2008-2009 WURFL-Pro srl
 */
package net.sourceforge.wurfl.core.request;

import net.sourceforge.wurfl.core.request.normalizer.UserAgentNormalizer;
import net.sourceforge.wurfl.core.request.normalizer.generic.BabelFishNormalizer;
import net.sourceforge.wurfl.core.request.normalizer.generic.BlackBerryNormalizer;
import net.sourceforge.wurfl.core.request.normalizer.generic.UPLinkNormalizer;
import net.sourceforge.wurfl.core.request.normalizer.generic.VodafoneNormalizer;
import net.sourceforge.wurfl.core.request.normalizer.generic.YesWAPNormalizer;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

/**
 * UserAgentNormalizerFactory default implementation.
 * 
 * <p>
 * Build a UserAgentNormalizerChain with the WURFL UserAgentNormalizers.
 * </p>
 * 
 * @author WURFL-PRO SRL, Rome, Italy
 * @version $Id: DefaultUserAgentNormalizerFactory.java 1045 2009-03-09 15:52:53Z filippo.deluca $
 */
public class DefaultUserAgentNormalizerFactory implements UserAgentNormalizerFactory {

	/** Log */
	private static final Log log = LogFactory.getLog(DefaultUserAgentNormalizerFactory.class);

	/**
	 * {@inheritDoc}
	 * 
	 * @return UserAgentNormalizerChain
	 */
	public UserAgentNormalizer create() {
		
		log.debug("Creating UserAgentNormalizerChain...");

		UserAgentNormalizerChain chain = new UserAgentNormalizerChain();
		chain.add(new VodafoneNormalizer());
		chain.add(new BlackBerryNormalizer());
		chain.add(new UPLinkNormalizer());
		chain.add(new YesWAPNormalizer());
		chain.add(new BabelFishNormalizer());
		
		return chain;
	}

}
